home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / CRACKBB.ZIP / Cracking3.txt < prev    next >
Text File  |  1996-05-18  |  63KB  |  1,493 lines

  1.  
  2.                          CRACKING 101 - 1990 edition
  3.  
  4.                                    Lesson 3
  5.  
  6.                    ┌─────────────────────────────────────┐
  7.                    │ CHAMBER OF THE SCI-MUTANT PREISTEST │
  8.                    └─────────────────────────────────────┘
  9.  
  10.     Oh shit, I have finally found a newer program that has on disk copy
  11. protection. Good, you'all need a refresher course on so here it is (YO JB
  12. study hard, you might learn something).
  13.  
  14.     CHAMBER of the SCI-MUTANT PREISTEST (CSMP) is a really fucked up game but
  15. was simple to unprotect. So, lets dive right in. We will be using DEBUG here
  16. (although I used periscope but then shit I'm special) to do the crack. Lets
  17. dive in. When we first load CSMP (the file ERE.COM) and unassemble it here is
  18. what we get.
  19.  
  20.     u 100 10B
  21.  
  22.     119A:0100 8CCA          MOV DX,CS
  23.     119A:0102 81C2C101      ADD DX,01C1
  24.     119A:0106 52            PUSH DX
  25.     119A:0107 BA0F00        MOV DX,000F
  26.     119A:010A 52            PUSH DX
  27.     119A:010B CB            RETF
  28.  
  29.     I included the register listing for a reason. NOTICE that this piece of
  30. code just seem to stop (the RETF) statement. Well, what is really does is
  31. place the address (segment and offset) of the real starting point on to the
  32. stack and the execute a far return to that location. Now this might fool a
  33. real beginner (or at least make him worry a bit but us...no way).
  34.  
  35.     If you take the current CS value and add 1C1 to it (in segment addition)
  36. you will get the segment address 135B (that is if you are using my example of
  37. 119A. If not then you will not get 135B but trust me, it's the right value).
  38.  
  39.     So since we want to be at the real program, execute the code until 10B
  40. (ie use the command "G 10B") then trace through the next instruction.
  41.  
  42.     If you now unassemble the code, here is what it should look like.
  43.  
  44.     -u 000f 36
  45.  
  46.     135B:000F 9C            PUSHF
  47.     135B:0010 50            PUSH AX
  48.     135B:0011 1E            PUSH DS
  49.     135B:0012 06            PUSH ES
  50.     135B:0013 0E            PUSH CS
  51.     135B:0014 1F            POP DS
  52.     135B:0015 0E            PUSH CS
  53.     135B:0016 07            POP ES
  54.     135B:0017 FC            CLD
  55.     135B:0018 89260B00      MOV [000B],SP
  56.     135B:001C C70600000102  MOV WORD PTR [0000],0201
  57.     135B:0022 B013          MOV AL,13
  58.     135B:0024 A23500        MOV [0035],AL
  59.     135B:0027 A2FF01        MOV [01FF],AL
  60.     135B:002A A22F02        MOV [022F],AL
  61.     135B:002D A23901        MOV [0139],AL
  62.     135B:0030 B280          MOV DL,80
  63.     135B:0032 B408          MOV AH,08
  64.     135B:0034 CD21          INT 21
  65.     135B:0036 7232          JB 006A
  66.  
  67.  
  68.     Since we are looking for a disk based copy protection, it might be a good
  69. time to look for INT 13. So search the current segment for INT 13 with the
  70. command
  71.  
  72.     S 135B:0 FFFF CD 13
  73.  
  74.     But shit, nothing. You mean this program doesn't use int 13.  Be real.
  75. Reread the first lesson. You know the one that talks about self modifing
  76. code. This is what we have here. Let's take a closer look at the last bit of
  77. code but this time, with my comments added.
  78.  
  79.     -u 000f 36
  80.  
  81.     ; The first part of the code simple sets up for the return to dos as well
  82.     ; as sets ES and DS
  83.  
  84.     135B:000F 9C            PUSHF
  85.     135B:0010 50            PUSH AX
  86.     135B:0011 1E            PUSH DS
  87.     135B:0012 06            PUSH ES
  88.     135B:0013 0E            PUSH CS
  89.     135B:0014 1F            POP DS       ; Set DS to CS
  90.     135B:0015 0E            PUSH CS
  91.     135B:0016 07            POP ES       ; Set ES to DS
  92.     135B:0017 FC            CLD
  93.  
  94.     135B:0018 89260B00      MOV [000B],SP
  95.  
  96.     ; The next instruction sets up a variable that is used in the routine
  97.     ; that reads in the sectors from the disk. More on later.
  98.  
  99.     135B:001C C70600000102  MOV WORD PTR [0000],0201
  100.  
  101.     ; Now, here is the self modifing code. Notice at AL is 13 (INT 13h ...
  102.     ; Get it). Look at the first memory location (35h) and remember that DS
  103.     ; = CS. With this in mind, when then instuction at 135B:0024 is executed
  104.     ; byte at 135B:0035 will be changed to 13h. That will in fact change the
  105.     ; INT 21h at 135B:0034 to an INT 13h. And so on, and so on.
  106.  
  107.     135B:0022 B013          MOV AL,13       ; New value
  108.     135B:0024 A23500        MOV [0035],AL   ; Change to INT 13h
  109.     135B:0027 A2FF01        MOV [01FF],AL   ; Change to INT 13h
  110.     135B:002A A22F02        MOV [022F],AL   ; Change to INT 13h
  111.     135B:002D A23901        MOV [0139],AL   ; Change to INT 13h
  112.  
  113.     ; If you lookup DOS function 08 you will find it's CONSOLE INPUT. Now
  114.     ; does that seem out of place to you.
  115.  
  116.     135B:0030 B280          MOV DL,80
  117.     135B:0032 B408          MOV AH,08
  118.     135B:0034 CD21          INT 21     ; Changed to INT 13h
  119.     135B:0036 7232          JB 006A
  120.  
  121.  
  122.     Whoa, that was tricky. If you execute up to 135B:30 here is what it
  123. should look like..
  124.  
  125.     135B:0030 B280          MOV DL,80
  126.     135B:0032 B408          MOV AH,08
  127.     135B:0034 CD13          INT 13
  128.     135B:0036 7232          JB 006A
  129.  
  130.     AHA, now we are getting somewhere. If we lookup what disk function 08
  131. means, you won't be suprised. Function 08h is GET DRIVE TYPE. It will tell
  132. what type of disk drive we have. Remember, if you are loading off of a hard
  133. disk then it wants to use a different routine. Since we want it to think we
  134. are loading off of disk, then we want to take this jump. So for now, force
  135. the jmp by setting IP to 6A.
  136.  
  137.     At 135B:006A you find another jmp instruction
  138.  
  139.     135B:006A EB6B          JMP 00D7
  140.  
  141.     This jumps to the routine that does the actual disk check. Here is the
  142. outer loop of that code (With my comments of course).
  143.  
  144.     ; This first part of this routine simply test to see how many disk drives
  145.     ; you have.
  146.  
  147.     135B:00D7 CD11          INT 11
  148.     135B:00D9 25C000        AND AX,00C0
  149.     135B:00DC B106          MOV CL,06
  150.     135B:00DE D3E8          SHR AX,CL
  151.     135B:00E0 FEC0          INC AL
  152.     135B:00E2 FEC0          INC AL
  153.     135B:00E4 A20200        MOV [0002],AL
  154.  
  155.     ; Next, so setup for the actual disk check
  156.  
  157.     135B:00E7 C606090000    MOV BYTE PTR [0009],00
  158.     135B:00EC B9F127        MOV CX,27F1
  159.     135B:00EF 8BE9          MOV BP,CX
  160.     135B:00F1 B107          MOV CL,07
  161.     135B:00F3 F8            CLC
  162.  
  163.     ; This calls the protection routine part 1
  164.  
  165.     135B:00F4 E82F00        CALL 0126
  166.  
  167.     135B:00F7 B9DE27        MOV CX,27DE
  168.     135B:00FA 8BE9          MOV BP,CX
  169.     135B:00FC B108          MOV CL,08
  170.     135B:00FE F9            STC
  171.  
  172.     ; This calls the protection routine part 2
  173.  
  174.     135B:00FF E82400        CALL 0126
  175.  
  176.     135B:0102 8D1E5802      LEA BX,[0258]
  177.     135B:0106 8D361C01      LEA SI,[011C]
  178.     135B:010A 8BCD          MOV CX,BP
  179.     135B:010C AC            LODSB
  180.     135B:010D 8AC8          MOV CL,AL
  181.  
  182.     ; This calls the protection routine part 3
  183.  
  184.     135B:010F E8E300        CALL 01F5
  185.  
  186.     ; Makes the final check
  187.  
  188.     135B:0112 7271          JB 0185
  189.     135B:0114 AC            LODSB
  190.     135B:0115 0AC0          OR AL,AL
  191.     135B:0117 75F4          JNZ 010D  ; If not correct, try again
  192.     135B:0119 EB77          JMP 0192  ; Correct, continue program
  193.     135B:011B 90            NOP
  194.  
  195.     There are calls to 2 different subroutines. The routine at 126 and the
  196. routine at 1F5. If you examine the routine at 126 you find that it makes
  197. several calls to the routine at 1F5. Then you you examine the routine at 1F5
  198. you see the actual call to INT 13. Here is the code for both routine with
  199. comments
  200.  
  201.     ; First, it sets up the sector, head and drive information. DS:000A holds
  202.     ; the sector to read
  203.  
  204.     135B:0126 880E0A00      MOV [000A],CL
  205.     135B:012A 8A160900      MOV DL,[0009]
  206.     135B:012E B600          MOV DH,00
  207.  
  208.     ; Sets the DTA
  209.  
  210.     135B:0130 8D365802      LEA SI,[0258]
  211.     135B:0134 7213          JB 0149
  212.  
  213.     ; Resets the disk
  214.  
  215.     135B:0136 33C0          XOR AX,AX
  216.     135B:0138 CD13          INT 13
  217.  
  218.     ; Calls the the check
  219.  
  220.     135B:013A B90114        MOV CX,1401  ; TRACK 14 sector 1
  221.     135B:013D 8BDE          MOV BX,SI
  222.     135B:013F E8B300        CALL 01F5
  223.  
  224.  
  225.     ; The next track/sector to read in is stored in BP
  226.  
  227.     135B:0142 8BCD          MOV CX,BP
  228.     135B:0144 E8AE00        CALL 01F5
  229.     135B:0147 7234          JB 017D     ; If an error occured, trap it.
  230.  
  231.  
  232.     135B:0149 88160900      MOV [0009],DL   ; Reset drive
  233.     135B:014D 8A0E0A00      MOV CL,[000A]   ; reset sector
  234.     135B:0151 E8A100        CALL 01F5       ; check protection
  235.     135B:0154 722F          JB 0185         ; Check for an error
  236.  
  237.     135B:0156 8D5C20        LEA BX,[SI+20]
  238.  
  239.     135B:0159 8BCD          MOV CX,BP       ; Get next T/S
  240.     135B:015B B010          MOV AL,10       ; Ignore this
  241.     135B:015D E89500        CALL 01F5       ; Check protection
  242.     135B:0160 7223          JB 0185         ; check for error
  243.  
  244.     ; The next sector of code checks to see if what was read in is the actual
  245.     ; protected tracks
  246.  
  247.     ; First check
  248.  
  249.     135B:0162 8DBCAC00      LEA DI,[SI+00AC]
  250.     135B:0166 B91000        MOV CX,0010
  251.     135B:0169 F3            REPZ
  252.     135B:016A A7            CMPSW
  253.  
  254.     ; NOTE: If it was a bad track, it will jmp to 185. A good read should
  255.     ; just continue
  256.  
  257.     135B:016B 7518          JNZ 0185
  258.  
  259.     ; Second check
  260.  
  261.     135B:016D 8D365802      LEA SI,[0258]
  262.     135B:0171 8D3E3702      LEA DI,[0237]
  263.     135B:0175 B90400        MOV CX,0004
  264.     135B:0178 F3            REPZ
  265.     135B:0179 A7            CMPSW
  266.  
  267.     ; see NOTE above
  268.  
  269.     135B:017A 7509          JNZ 0185
  270.  
  271.     ; This exit back to the main routine.
  272.  
  273.     135B:017C C3            RET
  274.  
  275.     ; Here is the start of the error trap routines. Basicly what they do is
  276.     ; check an error count. If it's not 0 then it retries everything. If it
  277.     ; is 0 then it exit back to dos.
  278.  
  279.     135B:017D FEC2          INC DL
  280.     135B:017F 3A160200      CMP DL,[0002]
  281.     135B:0183 72B1          JB 0136
  282.     135B:0185 E85400        CALL 01DC
  283.     135B:0188 8B260B00      MOV SP,[000B]
  284.     135B:018C 2BC9          SUB CX,CX
  285.     135B:018E 58            POP AX
  286.     135B:018F 50            PUSH AX
  287.     135B:0190 EB1F          JMP 01B1
  288.  
  289.  
  290.     ** Here is the actual code the does the check  **
  291.  
  292.     ; ES:BX points to the buffer
  293.  
  294.     135B:01F5 1E            PUSH DS
  295.     135B:01F6 07            POP ES
  296.  
  297.     ; SI is set to the # of retries
  298.  
  299.     135B:01F7 56            PUSH SI
  300.     135B:01F8 BE0600        MOV SI,0006
  301.  
  302.     ; Remember how I said we would use what was in DS:0000 later. well, here
  303.     ; is where you use it. It loads in the FUNCTION and # of sectors from
  304.     ; what is stored in DS:0000. This is just a trick to make the int 13
  305.     ; call more vague.
  306.  
  307.     135B:01FB A10000        MOV AX,[0000]
  308.     135B:01FE CD13          INT 13
  309.  
  310.     ; If there is no errors, then exit this part of the loop
  311.  
  312.     135B:0200 7309          JNB 020B
  313.     135B:0202 F6C480        TEST AH,80
  314.  
  315.     ; Check to see if it was a drive TIMEOUT. If so, then set an error flag
  316.     ; and exit
  317.  
  318.     135B:0205 7503          JNZ 020A
  319.  
  320.     ; It must have been a load error. Retry 6 times
  321.  
  322.     135B:0207 4E            DEC SI
  323.     135B:0208 75F1          JNZ 01FB
  324.  
  325.     ; Set the error flag
  326.  
  327.     135B:020A F9            STC
  328.  
  329.     ; restore SI and return
  330.  
  331.     135B:020B 5E            POP SI
  332.     135B:020C C3            RET
  333.  
  334.  
  335.     If you follow through all of that. You will see that the only real way
  336. out is the jmp to "135B:0192" at 135B:0119. So, how do we test it. Simple.
  337. Exit back to dos and let's add a temporary patch.
  338.  
  339.     Reload ERE.COM under debug. Execute the program setting a breakpoint at
  340. 135B:0022 (if you remember, that is right at the begining of the self
  341. modifing code). When execution stops, change you IP register to 192. Now
  342. execute the code.
  343.  
  344.     Well shit, we are at the main menu. We just bypassed the entire
  345. protection routine. So, now where to add the patch. We will be adding the
  346. patch at 135B:0022. But what should the patch be. In this case, simply
  347. jumping to 135B:0192 will do. So, reload ERE.COM under debug. Execute the
  348. code until 135B:0022. Now unassemble it. Here is the code fragment we need.
  349.  
  350.     135B:0022 B013          MOV AL,13
  351.     135B:0024 A23500        MOV [0035],AL
  352.     135B:0027 A2FF01        MOV [01FF],AL
  353.     135B:002A A22F02        MOV [022F],AL
  354.     135B:002D A23901        MOV [0139],AL
  355.  
  356.     Here is the code we want to use as the patch
  357.  
  358.     135B:0022 E96D01        JMP 192
  359.  
  360.     So, to add the patch, we search the file ERE.COM using PC-TOOLS. For our
  361. search string we use
  362.  
  363.             B0 13 A2 35 00 A2 FF 01 A2 2F 02 A2 39 01
  364.  
  365.     PC-TOOLS should find the search string at reletive sector #13. Edit the
  366. sector and change "B0 13 A2" to "E9 6D 01" (our patch) and save the sector.
  367.  
  368.     BOOM! your done and CSMP is cracked. Fun huh. You just kicked 5 seconds
  369. off of the load time. Preaty fucken good. Well, I hope this textfile helped.
  370.  
  371.  
  372.          -Buckaroo Banzai
  373.  
  374.  
  375.                          CRACKING 101 - 1990 Edition
  376.  
  377.                                    Lesson 4
  378.                                   revision 1
  379.  
  380.                  ┌─────────────────────────────────────────┐
  381.                  │ REMOVING THE DOC CHECK FOR STAR CONTROL │
  382.                  └─────────────────────────────────────────┘
  383.  
  384.     First, let me tell you about a major fuckup I made. When I first wrote
  385. this file, I left out a major part of the patch. For all of the user who got
  386. that version, I'm sorry but even I make mistakes at 3:00 in the morning.
  387. Anyway, just replace the original with this updated version
  388.  
  389.                                        - Buckaroo Banzai
  390.  
  391.     Hey, Buckaroo Banzai .. Cracking Guru back once again to help you lesser
  392. crackist learn. This time, we will be going over Star Control. This is the
  393. last lesson in the original 4. From here on out, I will simply release
  394. lessons as I write them.
  395.  
  396.     I want to say a few things about some of the groups out there right now.
  397. Speed isn't everything. I really wish that for example when you remove a doc
  398. check, most of us want it REMOVED. We don't want to have to enter your group
  399. name or even typing 1 letter is to much. We shouldn't even see the menu for
  400. the doc check. Now, I don't direct this to all of you, but there seems to
  401. have been a move from quality to quickness. Let's go back to the days of SPI
  402. (and INC when they were first getting started) and crack right. If there is a
  403. doc check, remove it, not just fake it. Nuff said, on with the tutorial.
  404.  
  405.     Star Control (SC for here out) is a preaty good game. The protection on
  406. it wasn't too  hard, but if you didn't read enough in to it, you would just
  407. kill the title music also.
  408.  
  409.     So, how do we go about cracking SC. Well for this one I opted to break
  410. out when SC asks for the code from the code wheel. Originaly I did this just
  411. for the hell of it, but it turned out to be a luck guess and made life a lot
  412. easier.
  413.  
  414.     As usual we will be using periscope to crack SC. I used PSKEY (using int
  415. 3 as the trap interrupt not int 2) to pop in at the input routine. So lets
  416. get started. Load up PS and PSKEY, then execute Star Control. When you get to
  417. the doc check, break out.
  418.  
  419.     Now you should be at the usual IRET instruction that's part of PSKEY.
  420. Now comes the tricky part. Since we are using a key trap to break out during
  421. the input sequence, we could be anywhere inside the entire input routine. So
  422. in cases like this I suggest finding a reference point.
  423.  
  424.     So how do you pick the reference point. Well, since this doc check must
  425. be entered via the keyboard you can bet somewhere it will call INT 16h (bios
  426. keyboard) (although there are times when this is not true, it rare). I think
  427. we should go off and find that call to that interrupt.
  428.  
  429.     So we trace (using the 'T' command) through some code and finally come
  430. apon the follow subroutine ....
  431.  
  432.     ( NOTE: all comments were added by me )
  433.  
  434.     ; This is the actual routine that is used to get a key
  435.  
  436.     2A00:09D4 55            PUSH BP
  437.     2A00:09D5 8BEC          MOV BP,SP
  438.     2A00:09D7 8A6606        MOV AH,[BP+06]
  439.     2A00:09DA 8AD4          MOV DL,AH
  440.     2A00:09DC 80E20F        AND DL,0F
  441.     2A00:09DF CD16          INT 16      ; Call to bios. We will
  442.     2A00:09E1 7509          JNZ 09EC    ; use this as our
  443.     2A00:09E3 80FA01        CMP DL,01   ; reference point
  444.     2A00:09E6 7504          JNZ 09EC
  445.     2A00:09E8 33C0          XOR AX,AX
  446.     2A00:09EA EB0A          JMP 09F6
  447.     2A00:09EC 80FA02        CMP DL,02
  448.     2A00:09EF 7405          JZ 09F6
  449.     2A00:09F1 0BC0          OR AX,AX
  450.     2A00:09F3 7501          JNZ 09F6
  451.     2A00:09F5 48            DEC AX
  452.     2A00:09F6 5D            POP BP
  453.     2A00:09F7 CB            RETF
  454.  
  455.     So we write down the address of our REFERENCE point and get ready to
  456. procede. Now, It's really kinda boring to keep trying to trace through the
  457. entire input routine while trying to enter the code string, so what we want
  458. to do next, is to figure out the input routine. A quick look at this last
  459. section of code shows that it only reads in a character but really does not
  460. handle it.
  461.  
  462.     So, we exit via the RETF at 9F7 enter the next level of the subroutine.
  463. Again, if you manual trace through this routine (as well as the next level
  464. up) you see that it simple exits out rather quickly. This is definitly not
  465. the top loop of the imput routine.
  466.  
  467.     So, we trace through the next level up, and again exit quickly to a
  468. higher level. But this time, as we trace through, we find that the it loops
  469. back on itself. AHA, the outer input loop. Here is the code to the entire
  470. input loop. I have marked the place where you should enter from the lower
  471. level.
  472.  
  473.                      ( String input loop -- Outer level )
  474.  
  475.     7C00:0835 FF365220      PUSH [2052]
  476.     7C00:0839 FF365020      PUSH [2050]
  477.     7C00:083D 9A2802FD41    CALL 41FD:0228     ;  Entery here
  478.     7C00:0842 888670FE      MOV [BP+FE70],AL
  479.     7C00:0946 0AC0          OR AL,AL
  480.     7C00:0848 7503          JNZ 084D
  481.     7C00:084A E99200        JMP 08DF
  482.     7C00:084D 2AE4          SUB AH,AH
  483.     7C00:084F 2D0800        SUB AX,0008
  484.     7C00:0852 745A          JZ 08AE
  485.     7C00:0854 48            DEC AX
  486.     7C00:0855 48            DEC AX
  487.     7C00:0856 7503          JNZ 085B
  488.     7C00:0858 E90901        JMP 0964
  489.     7C00:085B 2D0300        SUB AX,0003
  490.     7C00:085E 7503          JNZ 0863
  491.     7C00:0860 E90101        JMP 0964
  492.     7C00:0863 8A9E70FE      MOV BL,[BP+FE70]
  493.     7C00:0867 2AFF          SUB BH,BH
  494.     7C00:0869 F687790B57    TEST BYTE PTR [BX+0B79],57
  495.     7C00:086E 746F          JZ 08DF
  496.     7C00:0870 F687790B03    TEST BYTE PTR [BX+0B79],03
  497.     7C00:0875 740C          JZ 0883
  498.     7C00:0877 F687790B02    TEST BYTE PTR [BX+0B79],02
  499.     7C00:087C 7405          JZ 0883
  500.     7C00:087E 80AE70FE20    SUB BYTE PTR [BP+FE70],20
  501.     7C00:0883 8A8670FE      MOV AL,[BP+FE70]
  502.     7C00:0887 C49E7EFE      LES BX,[BP+FE7E]
  503.     7C00:088B 8BB682FE      MOV SI,[BP+FE82]
  504.     7C00:088F 26            ES:
  505.     7C00:0890 8800          MOV [BX+SI],AL
  506.     7C00:0892 FF8682FE      INC WORD PTR [BP+FE82]
  507.     7C00:0896 FFB688FE      PUSH [BP+FE88]
  508.     7C00:089A 8D8678FE      LEA AX,[BP+FE78]
  509.     7C00:089E 50            PUSH AX
  510.     7C00:089F 9A56049324    CALL 2493:0456
  511.     7C00:08A4 83C404        ADD SP,+04
  512.     7C00:08A7 0BC0          OR AX,AX
  513.     7C00:08A9 7534          JNZ 08DF
  514.     7C00:08AB EB27          JMP 08D4
  515.     7C00:08AD 90            NOP
  516.     7C00:08AE 83BE82FE00    CMP WORD PTR [BP+FE82],+00
  517.     7C00:08B3 7404          JZ 08B9
  518.     7C00:08B5 FF8E82FE      DEC WORD PTR [BP+FE82]
  519.     7C00:08B9 B008          MOV AL,08
  520.     7C00:08BB 50            PUSH AX
  521.     7C00:08BC 9A1003443D    CALL 3D44:0310
  522.     7C00:08C1 8D8684FE      LEA AX,[BP+FE84]
  523.     7C00:08C5 16            PUSH SS
  524.     7C00:08C6 50            PUSH AX
  525.     7C00:08C7 9A6A00843D    CALL 3D84:006A
  526.     7C00:08CC B047          MOV AL,47
  527.     7C00:08CE 50            PUSH AX
  528.     7C00:08CF 9A1003443D    CALL 3D44:0310
  529.     7C00:08D4 8D8678FE      LEA AX,[BP+FE78]
  530.     7C00:08D8 16            PUSH SS
  531.     7C00:08D9 50            PUSH AX
  532.     7C00:08DA 9A8202C93C    CALL 3CC9:0282
  533.     7C00:08DF 83BE8CFE00    CMP WORD PTR [BP+FE8C],+00
  534.     7C00:08E4 7503          JNZ 08E9
  535.     7C00:08E6 E94CFF        JMP 0835    ; <───┐
  536.                                               │
  537.     as you can see, at this point it loops back on itself. This is what
  538. tells use that it's the outer loop. Knowing that, we can just set a code
  539. breakpoint at 8E9 (the next instruction after the loop) and execute the code.
  540.  
  541.     At this point, the SC will pause waiting for you to enter the code key.
  542. Use the code wheel and enter the correct key (after all, it's kinda hard to
  543. crack a game without having the proper codes right...)
  544.  
  545.     So, we have now exited the input loop with everything intact (ie: the
  546. proper code was entered). Next step is to figure out what happens when the
  547. proper code is entered. Well, since you have entered the proper code, just
  548. follow this routine out. Remember back to lesson 2. What we want to do is
  549. find the call the to routine that does the doc check and remove it somehow (a
  550. PROPER crack). So since everything is in the right place, if we just keep
  551. jumping over the code we should find our way out. So after jumping over many
  552. instructions, we come the the follow piece of code
  553.  
  554.     7C00:0B74 8BE5          MOV SP,BP
  555.     7C00:0B76 5D            POP BP
  556.     7C00:0B77 CB            RETF
  557.  
  558.     By now, you should know that what you are looking at is the exit routine
  559. for a higher level language's (C or pascal) code. So we have found the end of
  560. the doc check. After tracing through the RETF you find yourself looking down
  561. a cmp and a conditional jump. Here is the code (NOTE! I have included the
  562. actual call to the doc check just for reference)
  563.  
  564.     45E2:0235 9A46010F4A    CALL 7C00:146   ; Call to Doc Check
  565.     45E2:023A 83C404        ADD  SP,+04
  566.     45E2:023D 0BC0          OR   AX,AX
  567.     45E2:023F 7465          JZ   02A6
  568.  
  569.     Notice the value of the AX register. Since right after the doc check, it
  570. is acted upon, then it has some importance. So, now that we know where the
  571. doc check takes place, how do we remove it.
  572.  
  573.     Well, We could patch it with the code
  574.  
  575.     45E2:0235 B40100        MOV  AX,0001
  576.     45E2:0238 90            NOP
  577.     45E2:0239 90            NOP
  578.  
  579.     This patch will work (I know, it's how I first patched the program). But
  580. there is one small problem. If you run the program after adding this patch,
  581. you will find that the title music doesn't play. So, this is now a good place
  582. to put the patch.
  583.  
  584.     So where then. Well, make note of the address of the call to the doc
  585. check. Now, restart the process but this time right after SC switches in to
  586. graphics mode, break out.
  587.  
  588.     Now, set a breakpoint at the address from above (in my case 45E2:0235).
  589. Let SC run in to the intro. You will find that although the title screen
  590. comes up, the music doesn't kick in before the breakpoint is reached.
  591.  
  592.     No, they couldn't... they wouldn't... well they did. The music routines
  593. for the intro are stored in the routine for the doc check. Here is the entire
  594. doc check. I have commented on some of the code
  595.  
  596.     ; these first few calls seem to load something from disk
  597.  
  598.     7C00:0146 55            PUSH BP
  599.     7C00:0147 8BEC          MOV BP,SP
  600.     7C00:0149 81EC9001      SUB SP,0190
  601.     7C00:014D 57            PUSH DI
  602.     7C00:014E 56            PUSH SI
  603.     7C00:014F 8B4608        MOV AX,[BP+08]
  604.     7C00:0152 0B4606        OR AX,[BP+06]
  605.     7C00:0155 740E          JZ 0165
  606.     7C00:0157 FF7608        PUSH [BP+08]
  607.     7C00:015A FF7606        PUSH [BP+06]
  608.     7C00:015D 9A65341E2D    CALL 2D1E:3465
  609.     7C00:0162 83C404        ADD SP,+04
  610.     7C00:0165 FF365220      PUSH [2052]
  611.     7C00:0169 FF365020      PUSH [2050]
  612.     7C00:016D 9A2802FD41    CALL 41FD:0228
  613.     7C00:0172 0AC0          OR AL,AL
  614.     7C00:0174 75EF          JNZ 0165
  615.     7C00:0176 B80200        MOV AX,0002
  616.     7C00:0179 898664FF      MOV [BP+FF64],AX
  617.     7C00:017D 898672FF      MOV [BP+FF72],AX
  618.     7C00:0181 2BC0          SUB AX,AX
  619.     7C00:0183 898662FF      MOV [BP+FF62],AX
  620.     7C00:0187 89866AFF      MOV [BP+FF6A],AX
  621.     7C00:018B 898674FF      MOV [BP+FF74],AX
  622.     7C00:018F B80100        MOV AX,0001
  623.     7C00:0192 898666FF      MOV [BP+FF66],AX
  624.     7C00:0196 89866CFF      MOV [BP+FF6C],AX
  625.     7C00:019A 898670FF      MOV [BP+FF70],AX
  626.     7C00:019E 898676FF      MOV [BP+FF76],AX
  627.     7C00:01A2 B80300        MOV AX,0003
  628.     7C00:01A5 898668FF      MOV [BP+FF68],AX
  629.     7C00:01A9 89866EFF      MOV [BP+FF6E],AX
  630.     7C00:01AD 898678FF      MOV [BP+FF78],AX
  631.  
  632.     ; Although I have NO IDEA what the hell is being setup here I suspect
  633.     ; that it is the must
  634.  
  635.     7C00:01B1 C746860400    MOV WORD PTR [BP-7A],0004
  636.     7C00:01B6 C746880100    MOV WORD PTR [BP-78],0001
  637.     7C00:01BB C7468A0200    MOV WORD PTR [BP-76],0002
  638.     7C00:01C0 C7468C0000    MOV WORD PTR [BP-74],0000
  639.     7C00:01C5 C7468E0000    MOV WORD PTR [BP-72],0000
  640.     7C00:01CA C746900500    MOV WORD PTR [BP-70],0005
  641.     7C00:01CF C746920600    MOV WORD PTR [BP-6E],0006
  642.     7C00:01D4 C746940700    MOV WORD PTR [BP-6C],0007
  643.     7C00:01D9 C746960C00    MOV WORD PTR [BP-6A],000C
  644.     7C00:01DE 894698        MOV [BP-68],AX
  645.     7C00:01E1 C7469A0500    MOV WORD PTR [BP-66],0005
  646.     7C00:01E6 C7469C0D00    MOV WORD PTR [BP-64],000D
  647.     7C00:01EB C7469E0000    MOV WORD PTR [BP-62],0000
  648.     7C00:01F0 C746A00100    MOV WORD PTR [BP-60],0001
  649.     7C00:01F5 C746A20200    MOV WORD PTR [BP-5E],0002
  650.     7C00:01FA C746A40800    MOV WORD PTR [BP-5C],0008
  651.     7C00:01FF B80400        MOV AX,0004
  652.     7C00:0202 8946A6        MOV [BP-5A],AX
  653.     7C00:0205 8946A8        MOV [BP-58],AX
  654.     7C00:0208 C746AA0600    MOV WORD PTR [BP-56],0006
  655.     7C00:020D C746AC0800    MOV WORD PTR [BP-54],0008
  656.     7C00:0212 C746AE0700    MOV WORD PTR [BP-52],0007
  657.     7C00:0217 C746B00900    MOV WORD PTR [BP-50],0009
  658.     7C00:021C C746B20A00    MOV WORD PTR [BP-4E],000A
  659.     7C00:0221 8946B4        MOV [BP-4C],AX
  660.     7C00:0224 C746B60C00    MOV WORD PTR [BP-4A],000C
  661.     7C00:0229 C746B80300    MOV WORD PTR [BP-48],0003
  662.     7C00:022E C746BA0B00    MOV WORD PTR [BP-46],000B
  663.     7C00:0233 C746BC0D00    MOV WORD PTR [BP-44],000D
  664.     7C00:0238 C746BE0B00    MOV WORD PTR [BP-42],000B
  665.     7C00:023D C746C00500    MOV WORD PTR [BP-40],0005
  666.     7C00:0242 C746C20100    MOV WORD PTR [BP-3E],0001
  667.     7C00:0247 C746C40700    MOV WORD PTR [BP-3C],0007
  668.     7C00:024C C746C60000    MOV WORD PTR [BP-3A],0000
  669.     7C00:0251 C746C80600    MOV WORD PTR [BP-38],0006
  670.     7C00:0256 C746CA0200    MOV WORD PTR [BP-36],0002
  671.     7C00:025B C746CC0300    MOV WORD PTR [BP-34],0003
  672.     7C00:0260 C746CE0800    MOV WORD PTR [BP-32],0008
  673.     7C00:0265 C746D00900    MOV WORD PTR [BP-30],0009
  674.     7C00:026A C746D20A00    MOV WORD PTR [BP-2E],000A
  675.     7C00:026F C746D40B00    MOV WORD PTR [BP-2C],000B
  676.     7C00:0274 C746D60C00    MOV WORD PTR [BP-2A],000C
  677.     7C00:0279 C746D80A00    MOV WORD PTR [BP-28],000A
  678.     7C00:027E C746DA0500    MOV WORD PTR [BP-26],0005
  679.     7C00:0283 C746DC0D00    MOV WORD PTR [BP-24],000D
  680.     7C00:0288 C746DE0800    MOV WORD PTR [BP-22],0008
  681.     7C00:028D C746E00900    MOV WORD PTR [BP-20],0009
  682.     7C00:0292 C746E20300    MOV WORD PTR [BP-1E],0003
  683.     7C00:0297 C746E40B00    MOV WORD PTR [BP-1C],000B
  684.     7C00:029C C78692FE0000  MOV WORD PTR [BP+FE92],0000
  685.     7C00:02A2 C78694FE2B00  MOV WORD PTR [BP+FE94],002B
  686.     7C00:02A8 C78696FE0200  MOV WORD PTR [BP+FE96],0002
  687.     7C00:02AE C78698FE0300  MOV WORD PTR [BP+FE98],0003
  688.     7C00:02B4 89869AFE      MOV [BP+FE9A],AX
  689.     7C00:02B8 C7869CFE0500  MOV WORD PTR [BP+FE9C],0005
  690.     7C00:02BE C7869EFE0600  MOV WORD PTR [BP+FE9E],0006
  691.     7C00:02C4 C786A0FE0E00  MOV WORD PTR [BP+FEA0],000E
  692.     7C00:02CA C786A2FE2B00  MOV WORD PTR [BP+FEA2],002B
  693.     7C00:02D0 C786A4FE0900  MOV WORD PTR [BP+FEA4],0009
  694.     7C00:02D6 C786A6FE0A00  MOV WORD PTR [BP+FEA6],000A
  695.     7C00:02DC C786A8FE0B00  MOV WORD PTR [BP+FEA8],000B
  696.     7C00:02E2 C786AAFE0C00  MOV WORD PTR [BP+FEAA],000C
  697.     7C00:02E8 C786ACFE2B00  MOV WORD PTR [BP+FEAC],002B
  698.     7C00:02EE C786AEFE0F00  MOV WORD PTR [BP+FEAE],000F
  699.     7C00:02F4 C786B0FE0D00  MOV WORD PTR [BP+FEB0],000D
  700.     7C00:02FA C786B2FE1000  MOV WORD PTR [BP+FEB2],0010
  701.     7C00:0300 C786B4FE1100  MOV WORD PTR [BP+FEB4],0011
  702.     7C00:0306 C786B6FE1200  MOV WORD PTR [BP+FEB6],0012
  703.     7C00:030C C786B8FE1300  MOV WORD PTR [BP+FEB8],0013
  704.     7C00:0312 C786BAFE1400  MOV WORD PTR [BP+FEBA],0014
  705.     7C00:0318 C786BCFE1500  MOV WORD PTR [BP+FEBC],0015
  706.     7C00:031E C786BEFE1600  MOV WORD PTR [BP+FEBE],0016
  707.     7C00:0324 C786C0FE1700  MOV WORD PTR [BP+FEC0],0017
  708.     7C00:032A C786C2FE0800  MOV WORD PTR [BP+FEC2],0008
  709.     7C00:0330 C786C4FE1800  MOV WORD PTR [BP+FEC4],0018
  710.     7C00:0336 C786C6FE2B00  MOV WORD PTR [BP+FEC6],002B
  711.     7C00:033C C786C8FE1900  MOV WORD PTR [BP+FEC8],0019
  712.     7C00:0342 C786CAFE2B00  MOV WORD PTR [BP+FECA],002B
  713.     7C00:0348 C786CCFE1A00  MOV WORD PTR [BP+FECC],001A
  714.     7C00:034E C786CEFE1B00  MOV WORD PTR [BP+FECE],001B
  715.     7C00:0354 C786D0FE1C00  MOV WORD PTR [BP+FED0],001C
  716.     7C00:035A C786D2FE1D00  MOV WORD PTR [BP+FED2],001D
  717.     7C00:0360 C786D4FE1E00  MOV WORD PTR [BP+FED4],001E
  718.     7C00:0366 C786D6FE1F00  MOV WORD PTR [BP+FED6],001F
  719.     7C00:036C C786D8FE2000  MOV WORD PTR [BP+FED8],0020
  720.     7C00:0372 C786DAFE2100  MOV WORD PTR [BP+FEDA],0021
  721.     7C00:0378 C786DCFE0700  MOV WORD PTR [BP+FEDC],0007
  722.     7C00:037E C786DEFE2200  MOV WORD PTR [BP+FEDE],0022
  723.     7C00:0384 C786E0FE2300  MOV WORD PTR [BP+FEE0],0023
  724.     7C00:038A C786E2FE2400  MOV WORD PTR [BP+FEE2],0024
  725.     7C00:0390 C786E4FE2500  MOV WORD PTR [BP+FEE4],0025
  726.     7C00:0396 C786E6FE2600  MOV WORD PTR [BP+FEE6],0026
  727.     7C00:039C C786E8FE2B00  MOV WORD PTR [BP+FEE8],002B
  728.     7C00:03A2 C786EAFE2700  MOV WORD PTR [BP+FEEA],0027
  729.     7C00:03A8 C786ECFE2800  MOV WORD PTR [BP+FEEC],0028
  730.     7C00:03AE C786EEFE2900  MOV WORD PTR [BP+FEEE],0029
  731.     7C00:03B4 C786F0FE2A00  MOV WORD PTR [BP+FEF0],002A
  732.     7C00:03BA 8D46F4        LEA AX,[BP-0C]
  733.     7C00:03BD 50            PUSH AX
  734.     7C00:03BE 8D867AFF      LEA AX,[BP+FF7A]
  735.     7C00:03C2 50            PUSH AX
  736.     7C00:03C3 8D862CFF      LEA AX,[BP+FF2C]
  737.     7C00:03C7 50            PUSH AX
  738.     7C00:03C8 8D8628FF      LEA AX,[BP+FF28]
  739.     7C00:03CC 50            PUSH AX
  740.     7C00:03CD E832FC        CALL 0002   ; Music Plays
  741.     7C00:03D0 0BC0          OR AX,AX
  742.     7C00:03D2 7503          JNZ 03D7
  743.     7C00:03D4 E99B07        JMP 0B72
  744.     7C00:03D7 FF36AA1E      PUSH [1EAA]
  745.     7C00:03DB 9A0200443D    CALL 3D44:0002
  746.     7C00:03E0 FF36AE1E      PUSH [1EAE]
  747.     7C00:03E4 FF36AC1E      PUSH [1EAC]
  748.     7C00:03E8 9A0C008D3D    CALL 3D8D:000C
  749.     7C00:03ED B80201        MOV AX,0102
  750.     7C00:03F0 50            PUSH AX
  751.     7C00:03F1 9ADE02443D    CALL 3D44:02DE
  752.     7C00:03F6 B80400        MOV AX,0004
  753.     7C00:03F9 BA4000        MOV DX,0040
  754.     7C00:03FC 52            PUSH DX
  755.     7C00:03FD 50            PUSH AX
  756.     7C00:03FE 8D868CFE      LEA AX,[BP+FE8C]
  757.     7C00:0402 50            PUSH AX
  758.     7C00:0403 9A7000963B    CALL 3B96:0070    ; Music plays
  759.     7C00:0408 89868EFE      MOV [BP+FE8E],AX
  760.     7C00:040C 899690FE      MOV [BP+FE90],DX
  761.     7C00:0410 0BD0          OR DX,AX
  762.     7C00:0412 7471          JZ 0485
  763.     7C00:0414 2BC0          SUB AX,AX
  764.     7C00:0416 898686FE      MOV [BP+FE86],AX
  765.     7C00:041A 898684FE      MOV [BP+FE84],AX
  766.     7C00:041E FFB690FE      PUSH [BP+FE90]
  767.     7C00:0422 FFB68EFE      PUSH [BP+FE8E]
  768.     7C00:0426 9A0A00F93C    CALL 3CF9:000A
  769.     7C00:042B 898688FE      MOV [BP+FE88],AX
  770.     7C00:042F 89968AFE      MOV [BP+FE8A],DX
  771.     7C00:0433 833EB41E00    CMP WORD PTR [1EB4],+00
  772.     7C00:0438 7514          JNZ 044E
  773.     7C00:043A 8B4608        MOV AX,[BP+08]
  774.     7C00:043D 0B4606        OR AX,[BP+06]
  775.     7C00:0440 740C          JZ 044E
  776.     7C00:0442 B80100        MOV AX,0001
  777.     7C00:0445 50            PUSH AX
  778.     7C00:0446 9AF4019324    CALL 2493:01F4
  779.     7C00:044B 83C402        ADD SP,+02
  780.     7C00:044E 2AC0          SUB AL,AL
  781.     7C00:0450 50            PUSH AX
  782.     7C00:0451 9A4803443D    CALL 3D44:0348
  783.     7C00:0456 9A57331E2D    CALL 2D1E:3357
  784.     7C00:045B 9A9911A73B    CALL 3BA7:1199
  785.     7C00:0460 8D8684FE      LEA AX,[BP+FE84]
  786.     7C00:0464 16            PUSH SS
  787.     7C00:0465 50            PUSH AX
  788.     7C00:0466 9A04007E3D    CALL 3D7E:0004    ; Music plays
  789.     7C00:046B FFB68AFE      PUSH [BP+FE8A]
  790.     7C00:046F FFB688FE      PUSH [BP+FE88]
  791.     7C00:0473 9AF001F93C    CALL 3CF9:01F0
  792.     7C00:0478 FFB690FE      PUSH [BP+FE90]
  793.     7C00:047C FFB68EFE      PUSH [BP+FE8E]
  794.     7C00:0480 9A78068D3D    CALL 3D8D:0678    ; Music plays
  795.     7C00:0485 8B4608        MOV AX,[BP+08]
  796.     7C00:0488 0B4606        OR AX,[BP+06]
  797.     7C00:048B 7429          JZ 04B6
  798.     7C00:048D 833EB41E00    CMP WORD PTR [1EB4],+00
  799.     7C00:0492 740C          JZ 04A0
  800.     7C00:0494 B80100        MOV AX,0001
  801.     7C00:0497 50            PUSH AX
  802.     7C00:0498 9AF4019324    CALL 2493:01F4    ; Music Plays
  803.     7C00:049D 83C402        ADD SP,+02
  804.     7C00:04A0 9A8C341E2D    CALL 2D1E:348C
  805.     7C00:04A5 FF7608        PUSH [BP+08]
  806.     7C00:04A8 FF7606        PUSH [BP+06]
  807.     7C00:04AB 9A2A006342    CALL 4263:002A
  808.     7C00:04B0 50            PUSH AX
  809.     7C00:04B1 9A54006342    CALL 4263:0054
  810.  
  811.     ; this is the start of the actual doc check. OH! As you can tell, I
  812.     ; wasn't too intrested in the music routines, but thought it might be fun
  813.     ; to track them down
  814.  
  815.     7C00:04B6 9AD0098D3D    CALL 3D8D:09D0  ; Show Doc check
  816.                                             ; screen
  817.     7C00:04BB B80301        MOV AX,0103
  818.     7C00:04BE 50            PUSH AX
  819.     7C00:04BF 9ADE02443D    CALL 3D44:02DE
  820.     7C00:04C4 C746F60B00    MOV WORD PTR [BP-0A],000B
  821.     7C00:04C9 C746F87900    MOV WORD PTR [BP-08],0079
  822.     7C00:04CE C746FA2801    MOV WORD PTR [BP-06],0128
  823.     7C00:04D3 C746FC4500    MOV WORD PTR [BP-04],0045
  824.     7C00:04D8 B008          MOV AL,08
  825.     7C00:04DA 50            PUSH AX
  826.     7C00:04DB 9A1003443D    CALL 3D44:0310
  827.     7C00:04E0 8D867AFF      LEA AX,[BP+FF7A]
  828.     7C00:04E4 16            PUSH SS
  829.     7C00:04E5 50            PUSH AX
  830.     7C00:04E6 9A36007E3D    CALL 3D7E:0036  ; Show alien's face
  831.  
  832.     7C00:04EB C746E6A000    MOV WORD PTR [BP-1A],00A0
  833.     7C00:04F0 C746EA0100    MOV WORD PTR [BP-16],0001
  834.     7C00:04F5 C746840300    MOV WORD PTR [BP-7C],0003
  835.     7C00:04FA 2AC0          SUB AL,AL
  836.     7C00:04FC 50            PUSH AX
  837.     7C00:04FD 9A1003443D    CALL 3D44:0310
  838.     7C00:0502 8B46F8        MOV AX,[BP-08]
  839.     7C00:0505 050700        ADD AX,0007
  840.     7C00:0508 8946E8        MOV [BP-18],AX
  841.     7C00:050B FFB62EFF      PUSH [BP+FF2E]
  842.     7C00:050F FFB62CFF      PUSH [BP+FF2C]
  843.     7C00:0513 FFB62EFF      PUSH [BP+FF2E]
  844.     7C00:0517 FFB62CFF      PUSH [BP+FF2C]
  845.     7C00:051B 9AE400FC44    CALL 44FC:00E4
  846.     7C00:0520 8BF0          MOV SI,AX
  847.     7C00:0522 9A1201E245    CALL 45E2:0112
  848.     7C00:0527 B90500        MOV CX,0005
  849.     7C00:052A 8BD0          MOV DX,AX
  850.     7C00:052C 8BC6          MOV AX,SI
  851.     7C00:052E 8BDA          MOV BX,DX
  852.     7C00:0530 2BD2          SUB DX,DX
  853.     7C00:0532 F7F1          DIV CX
  854.     7C00:0534 8BD0          MOV DX,AX
  855.     7C00:0536 4A            DEC DX
  856.     7C00:0537 8BC3          MOV AX,BX
  857.     7C00:0539 8BDA          MOV BX,DX
  858.     7C00:053B 2BD2          SUB DX,DX
  859.     7C00:053D F7F3          DIV BX
  860.     7C00:053F 42            INC DX
  861.     7C00:0540 8BC2          MOV AX,DX
  862.     7C00:0542 D1E2          SHL DX,1
  863.     7C00:0544 D1E2          SHL DX,1
  864.     7C00:0546 03D0          ADD DX,AX
  865.     7C00:0548 52            PUSH DX
  866.     7C00:0549 9A2801FC44    CALL 44FC:0128
  867.     7C00:054E 89868EFE      MOV [BP+FE8E],AX
  868.     7C00:0552 899690FE      MOV [BP+FE90],DX
  869.     7C00:0556 C78672FE0000  MOV WORD PTR [BP+FE72],0000
  870.  
  871.     ; This is the start of the loop the prints out the stupid message
  872.  
  873.     7C00:055C 52            PUSH DX
  874.     7C00:055D 50            PUSH AX
  875.     7C00:055E 9A4602FC44    CALL 44FC:0246
  876.     7C00:0563 8946EC        MOV [BP-14],AX
  877.     7C00:0566 8956EE        MOV [BP-12],DX
  878.     7C00:0569 FFB690FE      PUSH [BP+FE90]
  879.     7C00:056D FFB68EFE      PUSH [BP+FE8E]
  880.     7C00:0571 9AF201FC44    CALL 44FC:01F2
  881.     7C00:0576 8946F0        MOV [BP-10],AX
  882.     7C00:0579 8D46E6        LEA AX,[BP-1A]
  883.     7C00:057C 16            PUSH SS
  884.     7C00:057D 50            PUSH AX
  885.     7C00:057E 9A8202C93C    CALL 3CC9:0282
  886.     7C00:0583 8346E80A      ADD WORD PTR [BP-18],+0A
  887.     7C00:0587 FFB690FE      PUSH [BP+FE90]
  888.     7C00:058B FFB68EFE      PUSH [BP+FE8E]
  889.     7C00:058F B80100        MOV AX,0001
  890.  
  891.     7C00:0592 50            PUSH AX
  892.     7C00:0593 9A7E01FC44    CALL 44FC:017E
  893.     7C00:0598 89868EFE      MOV [BP+FE8E],AX
  894.     7C00:059C 899690FE      MOV [BP+FE90],DX
  895.     7C00:05A0 FF8672FE      INC WORD PTR [BP+FE72]
  896.     7C00:05A4 83BE72FE05    CMP WORD PTR [BP+FE72],+05
  897.     7C00:05A9 7CB1          JL 055C
  898.  
  899.     ; Reads in the code to check (I think. Oh hell it really doesn't matter)
  900.  
  901.     7C00:05AB 9A1201E245    CALL 45E2:0112
  902.     7C00:05B0 B90C00        MOV CX,000C
  903.     7C00:05B3 99            CWD
  904.     7C00:05B4 F7F9          IDIV CX
  905.     7C00:05B6 895682        MOV [BP-7E],DX
  906.     7C00:05B9 9A1201E245    CALL 45E2:0112
  907.     7C00:05BE B90C00        MOV CX,000C
  908.     7C00:05C1 99            CWD
  909.     7C00:05C2 F7F9          IDIV CX
  910.     7C00:05C4 8956F2        MOV [BP-0E],DX
  911.     7C00:05C7 9A1201E245    CALL 45E2:0112
  912.     7C00:05CC B90C00        MOV CX,000C
  913.     7C00:05CF 99            CWD
  914.     7C00:05D0 F7F9          IDIV CX
  915.     7C00:05D2 8956FE        MOV [BP-02],DX
  916.     7C00:05D5 9A1201E245    CALL 45E2:0112
  917.     7C00:05DA B90C00        MOV CX,000C
  918.     7C00:05DD 99            CWD
  919.     7C00:05DE F7F9          IDIV CX
  920.     7C00:05E0 8996F4FE      MOV [BP+FEF4],DX
  921.     7C00:05E4 FFB62AFF      PUSH [BP+FF2A]
  922.     7C00:05E8 FFB628FF      PUSH [BP+FF28]
  923.     7C00:05EC FF7682        PUSH [BP-7E]
  924.     7C00:05EF 9A2801FC44    CALL 44FC:0128
  925.     7C00:05F4 89868EFE      MOV [BP+FE8E],AX
  926.     7C00:05F8 899690FE      MOV [BP+FE90],DX
  927.     7C00:05FC 52            PUSH DX
  928.     7C00:05FD 50            PUSH AX
  929.     7C00:05FE 8D86F6FE      LEA AX,[BP+FEF6]
  930.     7C00:0602 16            PUSH SS
  931.     7C00:0603 50            PUSH AX
  932.     7C00:0604 9A9A02FC44    CALL 44FC:029A
  933.     7C00:0609 FFB62AFF      PUSH [BP+FF2A]
  934.     7C00:060D FFB628FF      PUSH [BP+FF28]
  935.     7C00:0611 8B46FE        MOV AX,[BP-02]
  936.     7C00:0614 050C00        ADD AX,000C
  937.     7C00:0617 50            PUSH AX
  938.     7C00:0618 9A2801FC44    CALL 44FC:0128
  939.     7C00:061D 89868EFE      MOV [BP+FE8E],AX
  940.     7C00:0621 899690FE      MOV [BP+FE90],DX
  941.     7C00:0625 52            PUSH DX
  942.     7C00:0626 50            PUSH AX
  943.     7C00:0627 8DBEF6FE      LEA DI,[BP+FEF6]
  944.     7C00:062B 16            PUSH SS
  945.     7C00:062C 07            POP ES
  946.     7C00:062D B9FFFF        MOV CX,FFFF
  947.     7C00:0630 33C0          XOR AX,AX
  948.     7C00:0632 F2            REPNZ
  949.     7C00:0633 AE            SCASB
  950.     7C00:0634 F7D1          NOT CX
  951.     7C00:0636 49            DEC CX
  952.     7C00:0637 8BF1          MOV SI,CX
  953.     7C00:0639 8D82F6FE      LEA AX,[BP+SI+FEF6]
  954.     7C00:063D 16            PUSH SS
  955.     7C00:063E 50            PUSH AX
  956.     7C00:063F 9A9A02FC44    CALL 44FC:029A
  957.     7C00:0644 FFB62AFF      PUSH [BP+FF2A]
  958.     7C00:0648 FFB628FF      PUSH [BP+FF28]
  959.     7C00:064C 8B46F2        MOV AX,[BP-0E]
  960.     7C00:064F 051800        ADD AX,0018
  961.     7C00:0652 50            PUSH AX
  962.     7C00:0653 9A2801FC44    CALL 44FC:0128
  963.     7C00:0658 89868EFE      MOV [BP+FE8E],AX
  964.     7C00:065C 899690FE      MOV [BP+FE90],DX
  965.     7C00:0660 52            PUSH DX
  966.     7C00:0661 50            PUSH AX
  967.     7C00:0662 8DBEF6FE      LEA DI,[BP+FEF6]
  968.     7C00:0666 16            PUSH SS
  969.     7C00:0667 07            POP ES
  970.     7C00:0668 B9FFFF        MOV CX,FFFF
  971.     7C00:066B 33C0          XOR AX,AX
  972.     7C00:066D F2            REPNZ
  973.     7C00:066E AE            SCASB
  974.     7C00:066F F7D1          NOT CX
  975.     7C00:0671 49            DEC CX
  976.     7C00:0672 8BF1          MOV SI,CX
  977.     7C00:0674 8D82F6FE      LEA AX,[BP+SI+FEF6]
  978.     7C00:0678 16            PUSH SS
  979.     7C00:0679 50            PUSH AX
  980.     7C00:067A 9A9A02FC44    CALL 44FC:029A
  981.     7C00:067F FFB62AFF      PUSH [BP+FF2A]
  982.     7C00:0683 FFB628FF      PUSH [BP+FF28]
  983.     7C00:0687 8B86F4FE      MOV AX,[BP+FEF4]
  984.     7C00:068B 052400        ADD AX,0024
  985.     7C00:068E 50            PUSH AX
  986.     7C00:068F 9A2801FC44    CALL 44FC:0128
  987.     7C00:0694 89868EFE      MOV [BP+FE8E],AX
  988.     7C00:0698 899690FE      MOV [BP+FE90],DX
  989.     7C00:069C 52            PUSH DX
  990.     7C00:069D 50            PUSH AX
  991.     7C00:069E 8DBEF6FE      LEA DI,[BP+FEF6]
  992.     7C00:06A2 16            PUSH SS
  993.     7C00:06A3 07            POP ES
  994.     7C00:06A4 B9FFFF        MOV CX,FFFF
  995.     7C00:06A7 33C0          XOR AX,AX
  996.     7C00:06A9 F2            REPNZ
  997.     7C00:06AA AE            SCASB
  998.     7C00:06AB F7D1          NOT CX
  999.     7C00:06AD 49            DEC CX
  1000.     7C00:06AE 8BF1          MOV SI,CX
  1001.     7C00:06B0 8D82F6FE      LEA AX,[BP+SI+FEF6]
  1002.     7C00:06B4 16            PUSH SS
  1003.     7C00:06B5 50            PUSH AX
  1004.     7C00:06B6 9A9A02FC44    CALL 44FC:029A
  1005.     7C00:06BB C746E8B200    MOV WORD PTR [BP-18],00B2
  1006.     7C00:06C0 8D86F6FE      LEA AX,[BP+FEF6]
  1007.     7C00:06C4 8946EC        MOV [BP-14],AX
  1008.     7C00:06C7 8C56EE        MOV [BP-12],SS
  1009.     7C00:06CA 8DBEF6FE      LEA DI,[BP+FEF6]
  1010.     7C00:06CE 16            PUSH SS
  1011.     7C00:06CF 07            POP ES
  1012.     7C00:06D0 B9FFFF        MOV CX,FFFF
  1013.     7C00:06D3 33C0          XOR AX,AX
  1014.     7C00:06D5 F2            REPNZ
  1015.     7C00:06D6 AE            SCASB
  1016.     7C00:06D7 F7D1          NOT CX
  1017.     7C00:06D9 49            DEC CX
  1018.     7C00:06DA 894EF0        MOV [BP-10],CX
  1019.     7C00:06DD B084          MOV AL,84
  1020.     7C00:06DF 50            PUSH AX
  1021.     7C00:06E0 9A1003443D    CALL 3D44:0310
  1022.     7C00:06E5 8D46E6        LEA AX,[BP-1A]
  1023.     7C00:06E8 16            PUSH SS
  1024.     7C00:06E9 50            PUSH AX
  1025.     7C00:06EA 9A8202C93C    CALL 3CC9:0282  ; Displays the code to check
  1026.  
  1027.     7C00:06EF 8346E80A      ADD WORD PTR [BP-18],+0A
  1028.     7C00:06F3 FFB62AFF      PUSH [BP+FF2A]
  1029.     7C00:06F7 FFB628FF      PUSH [BP+FF28]
  1030.     7C00:06FB B85B00        MOV AX,005B
  1031.     7C00:06FE 50            PUSH AX
  1032.     7C00:06FF 9A2801FC44    CALL 44FC:0128
  1033.     7C00:0704 89868EFE      MOV [BP+FE8E],AX
  1034.     7C00:0708 899690FE      MOV [BP+FE90],DX
  1035.     7C00:070C 52            PUSH DX
  1036.     7C00:070D 50            PUSH AX
  1037.     7C00:070E 9A4602FC44    CALL 44FC:0246
  1038.     7C00:0713 8946EC        MOV [BP-14],AX
  1039.     7C00:0716 8956EE        MOV [BP-12],DX
  1040.     7C00:0719 FFB690FE      PUSH [BP+FE90]
  1041.     7C00:071D FFB68EFE      PUSH [BP+FE8E]
  1042.     7C00:0721 9AF201FC44    CALL 44FC:01F2
  1043.     7C00:0726 8946F0        MOV [BP-10],AX
  1044.     7C00:0729 2AC0          SUB AL,AL
  1045.     7C00:072B 50            PUSH AX
  1046.     7C00:072C 9A1003443D    CALL 3D44:0310
  1047.     7C00:0731 8D46E6        LEA AX,[BP-1A]
  1048.     7C00:0734 16            PUSH SS
  1049.     7C00:0735 50            PUSH AX
  1050.     7C00:0736 9A8202C93C    CALL 3CC9:0282   ; Displays "PROPER response" msg
  1051.  
  1052.     7C00:073B 8B86F4FE      MOV AX,[BP+FEF4]
  1053.     7C00:073F 2B46F2        SUB AX,[BP-0E]
  1054.     7C00:0742 898672FE      MOV [BP+FE72],AX
  1055.     7C00:0746 0346FE        ADD AX,[BP-02]
  1056.     7C00:0749 898676FE      MOV [BP+FE76],AX
  1057.     7C00:074D 0BC0          OR AX,AX
  1058.     7C00:074F 7D09          JGE 075A
  1059.     7C00:0751 050C00        ADD AX,000C
  1060.     7C00:0754 898676FE      MOV [BP+FE76],AX
  1061.     7C00:0758 EB0A          JMP 0764
  1062.     7C00:075A 3D0C00        CMP AX,000C
  1063.     7C00:075D 7C05          JL 0764
  1064.     7C00:075F 83AE76FE0C    SUB WORD PTR [BP+FE76],+0C
  1065.     7C00:0764 8B4682        MOV AX,[BP-7E]
  1066.     7C00:0767 038672FE      ADD AX,[BP+FE72]
  1067.     7C00:076B 898674FE      MOV [BP+FE74],AX
  1068.     7C00:076F 0BC0          OR AX,AX
  1069.     7C00:0771 7D09          JGE 077C
  1070.     7C00:0773 050C00        ADD AX,000C
  1071.     7C00:0776 898674FE      MOV [BP+FE74],AX
  1072.     7C00:077A EB0A          JMP 0786
  1073.     7C00:077C 3D0C00        CMP AX,000C
  1074.     7C00:077F 7C05          JL 0786
  1075.     7C00:0781 83AE74FE0C    SUB WORD PTR [BP+FE74],+0C
  1076.     7C00:0786 8BB6F4FE      MOV SI,[BP+FEF4]
  1077.     7C00:078A D1E6          SHL SI,1
  1078.     7C00:078C 8BB262FF      MOV SI,[BP+SI+FF62]
  1079.     7C00:0790 89B672FE      MOV [BP+FE72],SI
  1080.     7C00:0794 8B8676FE      MOV AX,[BP+FE76]
  1081.     7C00:0798 D1E0          SHL AX,1
  1082.     7C00:079A D1E0          SHL AX,1
  1083.     7C00:079C 03F0          ADD SI,AX
  1084.     7C00:079E D1E6          SHL SI,1
  1085.     7C00:07A0 8B8292FE      MOV AX,[BP+SI+FE92]
  1086.     7C00:07A4 8986F4FE      MOV [BP+FEF4],AX
  1087.     7C00:07A8 3D2B00        CMP AX,002B
  1088.     7C00:07AB 7515          JNZ 07C2
  1089.     7C00:07AD 8BB674FE      MOV SI,[BP+FE74]
  1090.     7C00:07B1 D1E6          SHL SI,1
  1091.     7C00:07B3 D1E6          SHL SI,1
  1092.     7C00:07B5 03B672FE      ADD SI,[BP+FE72]
  1093.     7C00:07B9 D1E6          SHL SI,1
  1094.     7C00:07BB 8B4286        MOV AX,[BP+SI-7A]
  1095.     7C00:07BE 8986F4FE      MOV [BP+FEF4],AX
  1096.     7C00:07C2 C78684FE7800  MOV WORD PTR [BP+FE84],0078
  1097.     7C00:07C8 B85100        MOV AX,0051
  1098.     7C00:07CB 898686FE      MOV [BP+FE86],AX
  1099.     7C00:07CF 898688FE      MOV [BP+FE88],AX
  1100.     7C00:07D3 C7868AFE0900  MOV WORD PTR [BP+FE8A],0009
  1101.     7C00:07D9 C78678FE7900  MOV WORD PTR [BP+FE78],0079
  1102.     7C00:07DF C7867AFE5900  MOV WORD PTR [BP+FE7A],0059
  1103.     7C00:07E5 C7867CFE0000  MOV WORD PTR [BP+FE7C],0000
  1104.     7C00:07EB 8D86F6FE      LEA AX,[BP+FEF6]
  1105.     7C00:07EF 89867EFE      MOV [BP+FE7E],AX
  1106.     7C00:07F3 8C9680FE      MOV [BP+FE80],SS
  1107.     7C00:07F7 C78682FE0000  MOV WORD PTR [BP+FE82],0000
  1108.     7C00:07FD FFB62AFF      PUSH [BP+FF2A]
  1109.     7C00:0801 FFB628FF      PUSH [BP+FF28]
  1110.     7C00:0805 8B86F4FE      MOV AX,[BP+FEF4]
  1111.     7C00:0809 053000        ADD AX,0030
  1112.     7C00:080C 50            PUSH AX
  1113.     7C00:080D 9A2801FC44    CALL 44FC:0128
  1114.     7C00:0812 89868EFE      MOV [BP+FE8E],AX
  1115.     7C00:0816 899690FE      MOV [BP+FE90],DX
  1116.     7C00:081A 52            PUSH DX
  1117.     7C00:081B 50            PUSH AX
  1118.     7C00:081C 8D8630FF      LEA AX,[BP+FF30]
  1119.     7C00:0820 16            PUSH SS
  1120.     7C00:0821 50            PUSH AX
  1121.     7C00:0822 9A9A02FC44    CALL 44FC:029A
  1122.     7C00:0827 B047          MOV AL,47
  1123.     7C00:0829 50            PUSH AX
  1124.     7C00:082A 9A1003443D    CALL 3D44:0310
  1125.     7C00:082F C7868CFE0000  MOV WORD PTR [BP+FE8C],0000
  1126.  
  1127.     ; All the code you just saw.  I have no clue what it does (hey at least
  1128.     ; I'm honest) but it wasn't important.
  1129.  
  1130.     ; Here is the imput outer loop
  1131.  
  1132.     7C00:0835 FF365220      PUSH [2052]
  1133.     7C00:0839 FF365020      PUSH [2050]
  1134.     7C00:083D 9A2802FD41    CALL 41FD:0228
  1135.     7C00:0842 888670FE      MOV [BP+FE70],AL
  1136.     7C00:0846 0AC0          OR AL,AL
  1137.     7C00:0848 7503          JNZ 084D
  1138.     7C00:084A E99200        JMP 08DF
  1139.     7C00:084D 2AE4          SUB AH,AH
  1140.     7C00:084F 2D0800        SUB AX,0008
  1141.     7C00:0852 745A          JZ 08AE
  1142.     7C00:0854 48            DEC AX
  1143.     7C00:0855 48            DEC AX
  1144.     7C00:0856 7503          JNZ 085B
  1145.     7C00:0858 E90901        JMP 0964
  1146.     7C00:085B 2D0300        SUB AX,0003
  1147.     7C00:085E 7503          JNZ 0863
  1148.     7C00:0860 E90101        JMP 0964
  1149.     7C00:0863 8A9E70FE      MOV BL,[BP+FE70]
  1150.     7C00:0867 2AFF          SUB BH,BH
  1151.     7C00:0869 F687790B57    TEST BYTE PTR [BX+0B79],57
  1152.     7C00:086E 746F          JZ 08DF
  1153.     7C00:0870 F687790B03    TEST BYTE PTR [BX+0B79],03
  1154.     7C00:0875 740C          JZ 0883
  1155.     7C00:0877 F687790B02    TEST BYTE PTR [BX+0B79],02
  1156.     7C00:087C 7405          JZ 0883
  1157.     7C00:087E 80AE70FE20    SUB BYTE PTR [BP+FE70],20
  1158.     7C00:0883 8A8670FE      MOV AL,[BP+FE70]
  1159.     7C00:0887 C49E7EFE      LES BX,[BP+FE7E]
  1160.     7C00:088B 8BB682FE      MOV SI,[BP+FE82]
  1161.     7C00:088F 26            ES:
  1162.     7C00:0890 8800          MOV [BX+SI],AL
  1163.     7C00:0892 FF8682FE      INC WORD PTR [BP+FE82]
  1164.     7C00:0896 FFB688FE      PUSH [BP+FE88]
  1165.     7C00:089A 8D8678FE      LEA AX,[BP+FE78]
  1166.     7C00:089E 50            PUSH AX
  1167.     7C00:089F 9A56049324    CALL 2493:0456
  1168.     7C00:08A4 83C404        ADD SP,+04
  1169.     7C00:08A7 0BC0          OR AX,AX
  1170.     7C00:08A9 7534          JNZ 08DF
  1171.     7C00:08AB EB27          JMP 08D4
  1172.     7C00:08AD 90            NOP
  1173.     7C00:08AE 83BE82FE00    CMP WORD PTR [BP+FE82],+00
  1174.     7C00:08B3 7404          JZ 08B9
  1175.     7C00:08B5 FF8E82FE      DEC WORD PTR [BP+FE82]
  1176.     7C00:08B9 B008          MOV AL,08
  1177.     7C00:08BB 50            PUSH AX
  1178.     7C00:08BC 9A1003443D    CALL 3D44:0310
  1179.     7C00:08C1 8D8684FE      LEA AX,[BP+FE84]
  1180.     7C00:08C5 16            PUSH SS
  1181.     7C00:08C6 50            PUSH AX
  1182.     7C00:08C7 9A6A00843D    CALL 3D84:006A
  1183.     7C00:08CC B047          MOV AL,47
  1184.     7C00:08CE 50            PUSH AX
  1185.     7C00:08CF 9A1003443D    CALL 3D44:0310
  1186.     7C00:08D4 8D8678FE      LEA AX,[BP+FE78]
  1187.     7C00:08D8 16            PUSH SS
  1188.     7C00:08D9 50            PUSH AX
  1189.     7C00:08DA 9A8202C93C    CALL 3CC9:0282
  1190.     7C00:08DF 83BE8CFE00    CMP WORD PTR [BP+FE8C],+00
  1191.     7C00:08E4 7503          JNZ 08E9
  1192.     7C00:08E6 E94CFF        JMP 0835
  1193.  
  1194.     ; Next comes the code that checks your entry. If you follow it through
  1195.     ; you will see it handles not only clearing the screen and printing the
  1196.     ; "GOOD GOING" message but it also handles bad entries, etc.
  1197.  
  1198.     7C00:08E9 8BB682FE      MOV SI,[BP+FE82]
  1199.     7C00:08ED C682F6FE00    MOV BYTE PTR [BP+SI+FEF6],00
  1200.     7C00:08F2 8DBE30FF      LEA DI,[BP+FF30]
  1201.     7C00:08F6 8DB6F6FE      LEA SI,[BP+FEF6]
  1202.     7C00:08FA 16            PUSH SS
  1203.     7C00:08FB 07            POP ES
  1204.     7C00:08FC B9FFFF        MOV CX,FFFF
  1205.     7C00:08FF 33C0          XOR AX,AX
  1206.     7C00:0901 F2            REPNZ
  1207.     7C00:0902 AE            SCASB
  1208.     7C00:0903 F7D1          NOT CX
  1209.     7C00:0905 2BF9          SUB DI,CX
  1210.     7C00:0907 F3            REPZ
  1211.     7C00:0908 A6            CMPSB
  1212.     7C00:0909 7405          JZ 0910
  1213.     7C00:090B 1BC0          SBB AX,AX
  1214.     7C00:090D 1DFFFF        SBB AX,FFFF
  1215.     7C00:0910 3D0100        CMP AX,0001
  1216.     7C00:0913 1BC0          SBB AX,AX
  1217.     7C00:0915 F7D8          NEG AX
  1218.     7C00:0917 8986F2FE      MOV [BP+FEF2],AX
  1219.     7C00:091B 0BC0          OR AX,AX
  1220.     7C00:091D 7509          JNZ 0928
  1221.     7C00:091F 837E8401      CMP WORD PTR [BP-7C],+01
  1222.     7C00:0923 7703          JA 0928
  1223.     7C00:0925 E91C02        JMP 0B44
  1224.     7C00:0928 0BC0          OR AX,AX
  1225.     7C00:092A 7506          JNZ 0932
  1226.     7C00:092C 837E8403      CMP WORD PTR [BP-7C],+03
  1227.     7C00:0930 740A          JZ 093C
  1228.     7C00:0932 0BC0          OR AX,AX
  1229.     7C00:0934 745E          JZ 0994
  1230.     7C00:0936 837E8403      CMP WORD PTR [BP-7C],+03
  1231.     7C00:093A 7358          JNB 0994
  1232.     7C00:093C B047          MOV AL,47
  1233.     7C00:093E 50            PUSH AX
  1234.     7C00:093F 9A1003443D    CALL 3D44:0310
  1235.     7C00:0944 8D867AFF      LEA AX,[BP+FF7A]
  1236.     7C00:0948 16            PUSH SS
  1237.     7C00:0949 50            PUSH AX
  1238.     7C00:094A 9A36007E3D    CALL 3D7E:0036
  1239.     7C00:094F 83BEF2FE00    CMP WORD PTR [BP+FEF2],+00
  1240.     7C00:0954 7518          JNZ 096E
  1241.     7C00:0956 FF7680        PUSH [BP-80]
  1242.     7C00:0959 FFB67EFF      PUSH [BP+FF7E]
  1243.     7C00:095D 9A1C04F93C    CALL 3CF9:041C
  1244.     7C00:0962 EB16          JMP 097A
  1245.     7C00:0964 C7868CFE0100  MOV WORD PTR [BP+FE8C],0001
  1246.     7C00:096A E972FF        JMP 08DF
  1247.     7C00:096D 90            NOP
  1248.     7C00:096E FF7680        PUSH [BP-80]
  1249.     7C00:0971 FFB67EFF      PUSH [BP+FF7E]
  1250.     7C00:0975 9A7204F93C    CALL 3CF9:0472
  1251.     7C00:097A 89867EFF      MOV [BP+FF7E],AX
  1252.     7C00:097E 895680        MOV [BP-80],DX
  1253.     7C00:0981 B008          MOV AL,08
  1254.     7C00:0983 50            PUSH AX
  1255.     7C00:0984 9A1003443D    CALL 3D44:0310
  1256.     7C00:0989 8D867AFF      LEA AX,[BP+FF7A]
  1257.     7C00:098D 16            PUSH SS
  1258.     7C00:098E 50            PUSH AX
  1259.     7C00:098F 9A36007E3D    CALL 3D7E:0036
  1260.     7C00:0994 B047          MOV AL,47
  1261.     7C00:0996 50            PUSH AX
  1262.     7C00:0997 9A1003443D    CALL 3D44:0310
  1263.     7C00:099C 8D46F6        LEA AX,[BP-0A]
  1264.     7C00:099F 16            PUSH SS
  1265.     7C00:09A0 50            PUSH AX
  1266.     7C00:09A1 9A6A00843D    CALL 3D84:006A
  1267.     7C00:09A6 B008          MOV AL,08
  1268.     7C00:09A8 50            PUSH AX
  1269.     7C00:09A9 9A1003443D    CALL 3D44:0310
  1270.     7C00:09AE 8D8684FE      LEA AX,[BP+FE84]
  1271.     7C00:09B2 16            PUSH SS
  1272.     7C00:09B3 50            PUSH AX
  1273.     7C00:09B4 9A6A00843D    CALL 3D84:006A
  1274.     7C00:09B9 83BEF2FE00    CMP WORD PTR [BP+FEF2],+00
  1275.     7C00:09BE 7503          JNZ 09C3
  1276.     7C00:09C0 E98500        JMP 0A48
  1277.     7C00:09C3 2AC0          SUB AL,AL
  1278.     7C00:09C5 50            PUSH AX
  1279.     7C00:09C6 9A1003443D    CALL 3D44:0310
  1280.     7C00:09CB 8B46F8        MOV AX,[BP-08]
  1281.     7C00:09CE 050700        ADD AX,0007
  1282.     7C00:09D1 8946E8        MOV [BP-18],AX
  1283.     7C00:09D4 FFB62EFF      PUSH [BP+FF2E]
  1284.     7C00:09D8 FFB62CFF      PUSH [BP+FF2C]
  1285.     7C00:09DC 2BC0          SUB AX,AX
  1286.     7C00:09DE 50            PUSH AX
  1287.     7C00:09DF 9A2801FC44    CALL 44FC:0128
  1288.     7C00:09E4 89868EFE      MOV [BP+FE8E],AX
  1289.     7C00:09E8 899690FE      MOV [BP+FE90],DX
  1290.     7C00:09EC C78672FE0000  MOV WORD PTR [BP+FE72],0000
  1291.     7C00:09F2 EB04          JMP 09F8
  1292.     7C00:09F4 FF8672FE      INC WORD PTR [BP+FE72]
  1293.     7C00:09F8 83BE72FE05    CMP WORD PTR [BP+FE72],+05
  1294.     7C00:09FD 7C03          JL 0A02
  1295.     7C00:09FF E94201        JMP 0B44
  1296.     7C00:0A02 52            PUSH DX
  1297.     7C00:0A03 50            PUSH AX
  1298.     7C00:0A04 9A4602FC44    CALL 44FC:0246
  1299.     7C00:0A09 8946EC        MOV [BP-14],AX
  1300.     7C00:0A0C 8956EE        MOV [BP-12],DX
  1301.     7C00:0A0F FFB690FE      PUSH [BP+FE90]
  1302.     7C00:0A13 FFB68EFE      PUSH [BP+FE8E]
  1303.     7C00:0A17 9AF201FC44    CALL 44FC:01F2
  1304.     7C00:0A1C 8946F0        MOV [BP-10],AX
  1305.     7C00:0A1F 8D46E6        LEA AX,[BP-1A]
  1306.     7C00:0A22 16            PUSH SS
  1307.     7C00:0A23 50            PUSH AX
  1308.     7C00:0A24 9A8202C93C    CALL 3CC9:0282
  1309.     7C00:0A29 8346E80A      ADD WORD PTR [BP-18],+0A
  1310.     7C00:0A2D FFB690FE      PUSH [BP+FE90]
  1311.     7C00:0A31 FFB68EFE      PUSH [BP+FE8E]
  1312.     7C00:0A35 B80100        MOV AX,0001
  1313.     7C00:0A38 50            PUSH AX
  1314.     7C00:0A39 9A7E01FC44    CALL 44FC:017E
  1315.     7C00:0A3E 89868EFE      MOV [BP+FE8E],AX
  1316.     7C00:0A42 899690FE      MOV [BP+FE90],DX
  1317.     7C00:0A46 EBAC          JMP 09F4
  1318.     7C00:0A48 B084          MOV AL,84
  1319.     7C00:0A4A 50            PUSH AX
  1320.     7C00:0A4B 9A1003443D    CALL 3D44:0310
  1321.     7C00:0A50 C746E88C00    MOV WORD PTR [BP-18],008C
  1322.     7C00:0A55 FFB62AFF      PUSH [BP+FF2A]
  1323.     7C00:0A59 FFB628FF      PUSH [BP+FF28]
  1324.     7C00:0A5D B85C00        MOV AX,005C
  1325.     7C00:0A60 50            PUSH AX
  1326.     7C00:0A61 9A2801FC44    CALL 44FC:0128
  1327.     7C00:0A66 89868EFE      MOV [BP+FE8E],AX
  1328.     7C00:0A6A 899690FE      MOV [BP+FE90],DX
  1329.     7C00:0A6E 52            PUSH DX
  1330.     7C00:0A6F 50            PUSH AX
  1331.     7C00:0A70 9A4602FC44    CALL 44FC:0246
  1332.     7C00:0A75 8946EC        MOV [BP-14],AX
  1333.     7C00:0A78 8956EE        MOV [BP-12],DX
  1334.     7C00:0A7B FFB690FE      PUSH [BP+FE90]
  1335.     7C00:0A7F FFB68EFE      PUSH [BP+FE8E]
  1336.     7C00:0A83 9AF201FC44    CALL 44FC:01F2
  1337.     7C00:0A88 8946F0        MOV [BP-10],AX
  1338.     7C00:0A8B 8D46E6        LEA AX,[BP-1A]
  1339.     7C00:0A8E 16            PUSH SS
  1340.     7C00:0A8F 50            PUSH AX
  1341.     7C00:0A90 9A8202C93C    CALL 3CC9:0282
  1342.     7C00:0A95 2AC0          SUB AL,AL
  1343.     7C00:0A97 50            PUSH AX
  1344.     7C00:0A98 9A1003443D    CALL 3D44:0310
  1345.     7C00:0A9D 8346E80B      ADD WORD PTR [BP-18],+0B
  1346.     7C00:0AA1 FFB690FE      PUSH [BP+FE90]
  1347.     7C00:0AA5 FFB68EFE      PUSH [BP+FE8E]
  1348.     7C00:0AA9 B80100        MOV AX,0001
  1349.     7C00:0AAC 50            PUSH AX
  1350.     7C00:0AAD 9A7E01FC44    CALL 44FC:017E
  1351.     7C00:0AB2 89868EFE      MOV [BP+FE8E],AX
  1352.     7C00:0AB6 899690FE      MOV [BP+FE90],DX
  1353.     7C00:0ABA 52            PUSH DX
  1354.     7C00:0ABB 50            PUSH AX
  1355.     7C00:0ABC 9A4602FC44    CALL 44FC:0246
  1356.     7C00:0AC1 8946EC        MOV [BP-14],AX
  1357.     7C00:0AC4 8956EE        MOV [BP-12],DX
  1358.     7C00:0AC7 FFB690FE      PUSH [BP+FE90]
  1359.     7C00:0ACB FFB68EFE      PUSH [BP+FE8E]
  1360.     7C00:0ACF 9AF201FC44    CALL 44FC:01F2
  1361.     7C00:0AD4 8946F0        MOV [BP-10],AX
  1362.     7C00:0AD7 8D46E6        LEA AX,[BP-1A]
  1363.     7C00:0ADA 16            PUSH SS
  1364.     7C00:0ADB 50            PUSH AX
  1365.  
  1366.     ; Lot's of code Huh?
  1367.  
  1368.     7C00:0ADC 9A8202C93C    CALL 3CC9:0282
  1369.     7C00:0AE1 C746E8BC00    MOV WORD PTR [BP-18],00BC
  1370.     7C00:0AE6 FFB690FE      PUSH [BP+FE90]
  1371.     7C00:0AEA FFB68EFE      PUSH [BP+FE8E]
  1372.     7C00:0AEE B80100        MOV AX,0001
  1373.     7C00:0AF1 50            PUSH AX
  1374.     7C00:0AF2 9A7E01FC44    CALL 44FC:017E
  1375.     7C00:0AF7 89868EFE      MOV [BP+FE8E],AX
  1376.     7C00:0AFB 899690FE      MOV [BP+FE90],DX
  1377.     7C00:0AFF 52            PUSH DX
  1378.     7C00:0B00 50            PUSH AX
  1379.     7C00:0B01 9A4602FC44    CALL 44FC:0246
  1380.     7C00:0B06 8946EC        MOV [BP-14],AX
  1381.     7C00:0B09 8956EE        MOV [BP-12],DX
  1382.     7C00:0B0C FFB690FE      PUSH [BP+FE90]
  1383.     7C00:0B10 FFB68EFE      PUSH [BP+FE8E]
  1384.     7C00:0B14 9AF201FC44    CALL 44FC:01F2
  1385.     7C00:0B19 8946F0        MOV [BP-10],AX
  1386.     7C00:0B1C 8D46E6        LEA AX,[BP-1A]
  1387.     7C00:0B1F 16            PUSH SS
  1388.     7C00:0B20 50            PUSH AX
  1389.     7C00:0B21 9A8202C93C    CALL 3CC9:0282
  1390.     7C00:0B26 B80100        MOV AX,0001
  1391.     7C00:0B29 50            PUSH AX
  1392.     7C00:0B2A 9AF4019324    CALL 2493:01F4
  1393.     7C00:0B2F 83C402        ADD SP,+02
  1394.     7C00:0B32 B047          MOV AL,47
  1395.     7C00:0B34 50            PUSH AX
  1396.     7C00:0B35 9A1003443D    CALL 3D44:0310
  1397.     7C00:0B3A 8D46F6        LEA AX,[BP-0A]
  1398.     7C00:0B3D 16            PUSH SS
  1399.     7C00:0B3E 50            PUSH AX
  1400.     7C00:0B3F 9A6A00843D    CALL 3D84:006A
  1401.     7C00:0B44 83BEF2FE00    CMP WORD PTR [BP+FEF2],+00
  1402.     7C00:0B49 7508          JNZ 0B53
  1403.     7C00:0B4B FF4E84        DEC WORD PTR [BP-7C]
  1404.     7C00:0B4E 7403          JZ 0B53
  1405.     7C00:0B50 E9A7F9        JMP 04FA
  1406.     7C00:0B53 FF76F4        PUSH [BP-0C]
  1407.     7C00:0B56 8D867AFF      LEA AX,[BP+FF7A]
  1408.     7C00:0B5A 50            PUSH AX
  1409.     7C00:0B5B FFB62EFF      PUSH [BP+FF2E]
  1410.     7C00:0B5F FFB62CFF      PUSH [BP+FF2C]
  1411.     7C00:0B63 FFB62AFF      PUSH [BP+FF2A]
  1412.     7C00:0B67 FFB628FF      PUSH [BP+FF28]
  1413.     7C00:0B6B E88EF5        CALL 00FC
  1414.     7C00:0B6E 8B86F2FE      MOV AX,[BP+FEF2]
  1415.     7C00:0B72 5E            POP SI
  1416.     7C00:0B73 5F            POP DI
  1417.  
  1418.     ; Here is the exit code I was talking about
  1419.  
  1420.     7C00:0B74 8BE5          MOV SP,BP
  1421.     7C00:0B76 5D            POP BP
  1422.     7C00:0B77 CB            RETF
  1423.     7C00:0B78 B85A06        MOV AX,065A
  1424.     7C00:0B7B CB            RETF
  1425.     7C00:0B7C B89006        MOV AX,0690
  1426.     7C00:0B7F CB            RETF
  1427.  
  1428.     Ok, after looking through all of that, can you tell me where to put the
  1429. patch. Simple. How about right at the begining of the doc check right after
  1430. the music routines (ie address 7C00:04B6). Hey yeah... good idea. But how do
  1431. we want to patch it. Well, since this is a higher level language, we just
  1432. can't use RETF. We must reset the stack. Since I hate large patches, a simply
  1433. decided on the follow patch
  1434.  
  1435.     7C00:04B6 E9BB06        JMP B74
  1436.  
  1437.     Ok, by jumping to 0B74, we still get the music but the actual doc check
  1438. is not executed. But there is still a problem. Remember how I said that AX
  1439. was tested after the doc check. Well, we still have to fake the check. The
  1440. easiest way, is to simply NOP the condition jmp. Here is the section of code
  1441. again
  1442.  
  1443.     45E2:0235 9A46010F4A    CALL 7C00:146   ; Call to Doc Check
  1444.     45E2:023A 83C404        ADD  SP,+04
  1445.     45E2:023D 0BC0          OR   AX,AX
  1446.     45E2:023F 7465          JZ   02A6
  1447.  
  1448.     If you remember, when you enter the right code, AX will be set to 0001
  1449. when we exit to  45E2:023A. If we OR 0001 and 0001 we get 0001. Here is the
  1450. binary ...
  1451.  
  1452.           0000 0000 0000 0001  ( remember OR means if
  1453.                                  either is bit
  1454.       or  0000 0000 0000 0001    is 1 )
  1455.           ───────────────────
  1456.           0000 0000 0000 0001
  1457.  
  1458.     Clearly we don't want to branch at the JZ at 45E2:023F. So, to finish the
  1459. patch we simply NOP that jmp.
  1460.  
  1461.     Oh boy... that was hard. So let's test it out. But first, a little
  1462. forsight. We will need a unique string of bytes to search for when making the
  1463. patch. I say we use the code from 7C00:04C4 to 7C00:04CE and from 45E2:0235
  1464. to 45E2:023F. Yea, write down the hex equivelent and then restart. Again
  1465. break in right after the switch to graphics. Now add the patch (ie A
  1466. 7C00:04B6 <ENTER>, etc.). Now execute the program.
  1467.  
  1468.  
  1469.     SHIT! It worked, we are fucking amazing. Ok, now adding the patch
  1470. permenatly. Using PCTOOLS (or whatever) search the file STARCON.EXE for the
  1471. bytes mention above (ie: C746F60B00C746F87900C746FA2801) But wait, now
  1472. matches... Hmmm strange. It was there just a minute ago... but wait there...
  1473. another file STARCON.OVL (as we  all  know .OVL mean OVERLAY). Let's try
  1474. searching this one.
  1475.  
  1476.     There we go, that's better (it should should up on the 13 sector read
  1477. in). Now to add the patch. Simply find the search bytes and the go backwards
  1478. until the first occurance of the hex byte 9A. Add the patch here. Save it.
  1479.  
  1480.     Next, add the patch to 45E2:023F. Search for the bytes 83C4040BC07465.
  1481. The should appear on sector 3 (give or take a few sectors). Now simply change
  1482. the 2 bytes 74 65 to 90 90 and save the sector. Now, you are good to go.
  1483.  
  1484.     Well shit, this has been some hell of a textfile. 1113 lines in all. But
  1485. what detail. Ok I hope you learned something from all of this. And this end
  1486. the first part of CRACKING 101 - the 1990 edition. From here out all lessons
  1487. (lesson 5 and up) will be released on their own.
  1488.  
  1489.     I would like the thank Phantom Phlegm for pushing me to finish this shit.
  1490. Till lesson 5 this is Buckaroo Banzai, signing off.
  1491.  
  1492.  
  1493.